
#ifndef _MEMBER_BXMLNODE_H_
#define _MEMBER_BXMLNODE_H_

#include <BMap>
#include <BXmlNode>

#define xmlnode_member(xmlnode)	((member_BXmlNode*)((BXmlNode*)xmlnode)->_ptr)

namespace BWE
{
	class AttribPair
	{
	public:
		AttribPair()
		{

		}
		BString		name;
		BString		value;
	};
	class XmlFilter
	{
	public:
		XmlFilter(const BString& desc);

		bool operator()(BXmlNode* node) const;

		BString				name;
		BArray<AttribPair>	attribs;
		BArray<BString>		includeTexts;
		BArray<BString>		excludeTexts;
	};

	class member_BXmlNode
	{
	public:
		member_BXmlNode(BXmlNode* xmlNode);
		~member_BXmlNode();

		
		BXmlNode*				boss;
		BXmlNode*				parent;
		BString					text;
		BArray<AttribPair>		attribs;
		BList<BXmlNodeHolder>	children;
		BString					format;

		char					head_pre;
		char					head_post;
		char					head_in_pre;
		char					head_in_post;

		char					tail_pre;
		char					tail_post;
		char					tail_in_pre;
		char					tail_in_post;

		bool					dirty;
		BString					plainText;
	};
}

#endif
